package com.manner.groupon.controller.staff;

import com.manner.groupon.common.BaseResponse;
import com.manner.groupon.common.ResultUtils;
import com.manner.groupon.model.vo.StaffQueryStoreAccountFlowVO;
import com.manner.groupon.service.store.StoreAccountFlowService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Manner
 * @Description: 平台内部员工对商户门店订单流水的操作请求控制器
 * @DateTime: 2024/11/11 10:38
 */
@RestController("staffStoreFlowController")
@RequestMapping("/staff/store/groupon/order/flow")
@RequiredArgsConstructor
public class StoreFlowController {

    private final StoreAccountFlowService storeAccountFlowService;

    /**
     * @return BaseResponse<StaffQueryStoreAccountFlowVO>
     * @description: 员工查询个人流水记录
     * @author Manner
     * @date 2024/11/11 10:43
     */
    @GetMapping("/{phone}")
    public BaseResponse<List<StaffQueryStoreAccountFlowVO>> LoadAllLinkmanStoreAccountFlow(@PathVariable("phone") String staffPhone) {
        return ResultUtils.success(storeAccountFlowService.getAllFlow(staffPhone));
    }
}
